<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<?php
echo '<?xml version="1.0" encoding="UTF-8" />';
echo $this->doctype();
$config = Zend_Registry::get ( "config" );
$versionNm = $config->project->version;
?>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<title>
<?php if($this->pageTitle != null) 
	echo $this->pageTitle;
	else{
	?>托个行李 | 海外华人行李托带网 tuogexingli.com <?php }?>


</title>
<meta name="description" content="<?php if($this->pageDesc != null) 
	echo $this->pageDesc;
	else{
	?>托个行李   | 海外华人行李托带网 希望能为海外的华人朋友们提供一个互助，便捷，免费的行李托带平台.<?php }?>" />
	
	<?php 
	$config = Zend_Registry::get('config');?>
	
	<?php if($this->pageImage == "want") {?>
	<link rel="image_src" href="<?php echo $config->baseurl."/img/qiuTuoBig.png"; ?>" />
	<?php }?>
	<?php if($this->pageImage == "lease") {?>
	<link rel="image_src" href="<?php echo $config->baseurl."/img/keTuoBig.png"; ?>" />
	<?php } else {?>
	<link rel="image_src" href="<?php echo $config->baseurl."/img/onlyBag.png"; ?>" />
	<?php }?>
		
	<link type="image/x-icon"  rel="icon" href="<?php echo $config->baseurl."/img/favicon.ico"?>">
	<link type="image/x-icon"  rel="shortcut icon" href="<?php echo $config->baseurl."/img/favicon.ico"?>">
<?php
$this->headLink()->prependStylesheet($config->baseurl.'/'.$versionNm.'_css/layout.css');
$this->headLink()->prependStylesheet($config->baseurl.'/'.$versionNm.'_css/reset.css');

$this->headScript()->prependFile($config->baseurl.'/'.$versionNm.'_js/jquery-1.4.2.min.js');
	
echo $this->headLink();
?>
<script type="text/javascript">

  var _gaq = _gaq || [];
  _gaq.push(['_setAccount', 'UA-27356320-1']);
  _gaq.push(['_trackPageview']);

  (function() {
    var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
    ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
    var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
  })();

</script>
</head>

<body>
<div id="baseUrl"><?php echo $config->baseurl;?></div>
<div id="headerWrapper">
<a id="logo" title="首页" href="<?php echo $this->url(array('controller'=>'bulletin','action'=>'list'), "index", true);?>">托个行李 | 海外华人行李托带网 tuogexingli.com</a>
<div id="logoText"><strong>海外华人行李托带网</strong> - tuogexingli.com</div>
<div id="explainBlock">
	<div id="explainKeTuo">邮寄太烦 代购太贵 - 【求托】</div>
	<div id="explainQiuTuo">交个朋友 赚点小钱 - 【可托】</div>
</div>
<div id="topRight">
	<div id="topLinks">
	<a href="<?php echo $this->url(array('controller'=>'index','action'=>'about'), "about", true);?>">关于</a>
	<a href="<?php echo $this->url(array('controller'=>'index','action'=>'help'), "help", true);?>">帮助</a>
	<a href="<?php echo $this->url(array('controller'=>'index','action'=>'term'), "terms", true);?>">声明</a>
	<a href="<?php echo $this->url(array('controller'=>'index','action'=>'contact'), "contact", true);?>">联系我们</a>
	<a id="facebookIcon" href="http://www.facebook.com/pages/%E6%89%98%E4%B8%AA%E8%A1%8C%E6%9D%8E-%E6%B5%B7%E5%A4%96%E5%8D%8E%E4%BA%BA%E8%A1%8C%E6%9D%8E%E6%89%98%E5%B8%A6%E7%BD%91-tuogexinglicom/143959745707824" title="我们的Facebook主页"></a>
	<a id="weiboIcon" href="http://www.weibo.com/tuogexingli" title="我们的新浪微博"></a>
	</div>
	<a id="createPost" title="发个帖子" href="<?php echo $this->url(array('controller'=>'bulletin','action'=>'create'), "default", true);?>"></a>
	<div id="createPostText">互助   免费   便捷  无需注册   </div>
</div>
</div>


<div id="wrapper">

<?php
if (Zend_Controller_Front::getInstance()->getRequest()->getControllerName()== "bulletin" 
	&& (Zend_Controller_Front::getInstance()->getRequest()->getActionName()=="list" || Zend_Controller_Front::getInstance()->getRequest()->getActionName()=="view" )){?>
<div class="contentWrapper" id="searchContent">
<div class="contentHeader">
<div class="contentlt"></div>
<div class="contentt"></div>
<div class="contentrt"></div>
</div>

<div class="content">


<div class="contentInner">

<?php 
echo $this->searchForm;
?>
	


</div>
</div>

<div class="contentFooter">
<div class="contentlb"></div>
<div class="contentb"></div>
<div class="contentrb"></div>
</div>
</div>

<?php }?>
<div class="contentWrapper" id="mainContent">
<div class="contentHeader">
<div class="contentlt"></div>
<div class="contentt"></div>
<div class="contentrt"></div>
</div>

<div class="content">

<?php
if(count($this->flashmsgs)>0) {?> <div class="flashMsg"> <?php
foreach($this->flashmsgs as $msg) {
	echo $msg;
}?> </div> <?php }?>

<div class="contentInner">

<?php 

echo $this->layout()->content;

?>
</div>
</div>

<div class="contentFooter">
<div class="contentlb"></div>
<div class="contentb"></div>
<div class="contentrb"></div>
</div>


<div id="footer" style="width:945px;">
<div style="float:left;">© 2011 tuogexingli.com, All Rights Reserved </div>
</div>

</div>
</div>
</body>



<?php echo $this->headScript();?>
<script type="text/javascript">
var $ = jQuery.noConflict();
$(document).ready(function() {
$baseUrl=$("#baseUrl").text();  
    
    //live change doesn't work in ie jquery 1.4.2
    $("#from_country,#to_country").bind("change",function(){
    	$formId = $(this).parents("form").attr("id");
    	$which_country = $(this).attr("id").replace("_country","_city");
    	
    	$.ajax({
    		  url: $baseUrl+ '/bulletin/citylistajax',
    		  type: 'post',
    		  dataType: 'json',
    		  async: false,
    		  data: ({countryId : parseInt($(this).val())}),
    		  success: function(data) {
    			if(data.exist) {
    				$("form[id='"+$formId+"']").find("[id='"+$which_country+"']").empty().append(data.list);
    			} else {
    				$("form[id='"+$formId+"']").find("[id='"+$which_country+"']").empty();
    			}
    		  }});   
    
    });
}); 
</script>
</html>